<?php
	header('Content-type: text/html;charset=utf-8');//指定发送数据的编码格式
	$conn=mysqli_connect("localhost","root","root");
	mysqli_select_db($conn,"db_user");
	mysqli_query($conn,"set names utf8");
	$username=$_POST['username'];
	$pwd=$_POST['pwd'];
	$sql="select * from tb_user where username='".$username."' and pwd='".$pwd."'";
	$result=mysqli_query($conn,$sql);	//执行查询语句
	$row = mysqli_fetch_array($result);
	if($row){
		echo true;  
	}else{
		echo false;
	}
?>
